#include"progressBar.h"
const char* str="|/-\\";
char arr[102];
void  progressbar( int rate){
  if(rate<0||rate>100)
    return ;
  int len=strlen(str);
  
    printf("[%-100s][%d%%][%c]\r",arr,rate,str[rate%len]);
    fflush(stdout);
    arr[rate++]=STYLE;
  
    if(rate<100)
arr[rate]=RIGHT;
  
}
